home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Original Shareware 1.1
/
The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso
/
25
/
arj200.exe
/
arj
/
TECHNOTE.DOC
< prev
next >
Wrap
Text File
|
1991-04-10
|
5KB
|
141 lines
ARJ TECHNICAL INFORMATION March 1991
Modification history:
Date Description of modification:
03/11/91 Added test_dirtype(). Added directory file type.
02/23/91 Added more comments.
02/19/91 Added get_line() function.
01/21/91 Added get_recd_size() function.
01/10/91 Corrected timestamp description and header order of file mode.
10/30/90 Corrected values of flags in ARJ flags.
ARJ archives contains two types of header blocks:
Archive main header - This is located at the head of the archive
Local file header - This is located before each archived file
Structure of archive block (low order byte first):
Bytes Description
----- -------------------------------------------------------------------
2 header id (main and local file) = 0xEA60 or 60000U
2 basic header size (from 'first_hdr_size' thru 'comment' below)
= first_hdr_size + strlen(filename) + 1 + strlen(comment) + 1
= 0 if end of archive
1 first_hdr_size (size up to and including 'extra data')
1 archiver version number
1 minimum archiver version to extract
1 host OS (0 = MSDOS, 1 = PRIMOS, 2 = UNIX, 3 = AMIGA, 4 = MACDOS)
1 arj flags (0x01 = GARBLED_FLAG) indicates passworded file
(0x02 = RESERVED)
(0x04 = VOLUME_FLAG) indicates continued file to next
volume
(0x08 = EXTFILE_FLAG) indicates file starting position field
(0x10 = PATHSYM_FLAG) indicates path translated
("\" changed to "/")
1 method (0 = stored, 1 = compressed most ... 4 compressed fastest)
1 file type (0 = binary, 1 = 7-bit text, 2 = comment header)
(3 = directory)
1 reserved
4 date time modified
4 compressed size
4 original size (this will be different for text mode compression)
4 original file's CRC
2 filespec position in filename
2 file access mode
2 host data (currently not used)
? extra data
4 bytes for extended file position when used
(this is present when EXTFILE_FLAG is set)
? filename (null-terminated string)
? comment (null-terminated string)
4 basic header CRC
2 1st extended header size (0 if none)
? 1st extended header (not currently used)
4 1st extended header's CRC
...
? compressed file
Time stamp format:
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
|<---- year-1980 --->|<- month ->|<--- day ---->|
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
|<--- hour --->|<---- minute --->|<- second/2 ->|
Compression methods:
ARJ methods 1 to 3 use Lempel-Ziv 77 sliding window with static Huffman
encoding.
ARJ method 4 uses Lempel-Ziv 77 sliding window with pointer/length
unary encoding.
There is one decoder for methods 1 to 3 and one decoder for method 4.
Encryption technology:
ARJ does NOT use DES encryption algorithms. It uses a combination of
simple exclusive-or operations.
Source code description:
ARJ is written in ANSI C using only ANSI C library calls. All machine
dependent routines are located in an environment module. Simplified
versions allow porting to other operating systems with some loss of
functionality. The current version has been compiled with TURBO C++
1.0.
Data is stored in low-byte order first and read back the same way to
avoid the "endia" issue.
The environment routines are:
case_path() Uppercase pathname if case is not significant for OS
file_exists() Check for file existence
fix_path() Clean up file pathname (remove drive and root)
get_archive() Get state of archive bit
get_disk_avail() Get disk space availability
get_line() Get STDIN line of text.
get_recd_size() Get minimum disk record size
get_fsize() Get file size (return -1 if getting size is too
expensive)
get_ftime() Get file date-time modified
get_fmode() Get file access mode
get_mode_str() Convert access mode to displayable text (A--W)
match_wild() Provide filename component matching
reset_archive() Reset archive bit
set_fmode() Set file access mode
set_ftime() Set file date-time modified
set_stream() Set stream file translation mode.
test_ftype() Test the output file type for valid flat file
test_dirtype() Test the file for the directory type.
test_dir() Test if file path exist. If not, create it with
permission.
wild_list() Expand wildnames and recurse subdirectories if necessary
end of document